package com.eorchis.module.classdept.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

import com.eorchis.core.basedao.entity.IBaseEntity;
import com.eorchis.module.signupdept.domain.SignupDept;
import com.eorchis.module.trainingclass.domain.TrainingClass;

/**
 * Title: ClassDept<br>
 * Description: 班级部门关系表实体对象<br>
 * Company: GoldGov<br>
 * Copyright @ 2012 GoldGov .All rights reserved.<br>
 * @author Max
 * @createDate 2014-12-30
 * @version $Revision$
 */
@Entity
@Table(name = "TRAINING_CLASS_DEPT")
public class ClassDept implements IBaseEntity {
	private static final long serialVersionUID = 1L;

	private String classDeptId;//主键
	private TrainingClass trainingClass;//培训班ID
	private SignupDept signupDept;
	private Integer limitNum;//限制人数
	//private String classId;//ID
	
	/**
	 * 获取主键
	 */	
	@Id
	@GeneratedValue(generator = "system-uuid")
	@GenericGenerator(name = "system-uuid", strategy = "uuid")
	@Column(name="CLASS_DEPT_ID")
	public String getClassDeptId() {
		return classDeptId;
	}
	/**
	 * 设置主键
	 */		
	public void setClassDeptId(String classDeptId) {
		this.classDeptId = classDeptId;
	}
	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name="CLASS_ID",referencedColumnName = "CLASS_ID" )
	public TrainingClass getTrainingClass() {
		return trainingClass;
	}
	public void setTrainingClass(TrainingClass trainingClass) {
		this.trainingClass = trainingClass;
	}
	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name="DEPID",referencedColumnName = "DEPID" )
	public SignupDept getSignupDept() {
		return signupDept;
	}
	public void setSignupDept(SignupDept signupDept) {
		this.signupDept = signupDept;
	}
	
	@Column(name="LIMIT_NUM")
	public Integer getLimitNum() {
		return limitNum;
	}
	public void setLimitNum(Integer limitNum) {
		this.limitNum = limitNum;
	}
	
	
	
}
